home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000514_fine@cis.ohio-state.edu _Thu Jan 7 22:12:56 1993.msg < prev    next >
Internet Message Format  |  1994-01-24  |  2KB

  1. Return-Path: <fine@cis.ohio-state.edu>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA24894; Thu, 7 Jan 93 22:12:56 MET
  4. Received: by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA07421; Thu, 7 Jan 1993 22:27:54 +0100
  6. Received: by soccer.cis.ohio-state.edu (5.61-kk/5.911008)
  7.     id AA07870; Thu, 7 Jan 93 16:27:50 -0500
  8. Date: Thu, 7 Jan 93 16:27:50 -0500
  9. From: Thomas A. Fine <fine@cis.ohio-state.edu>
  10. Message-Id: <9301072127.AA07870@soccer.cis.ohio-state.edu>
  11. To: www-talk@nxoc01.cern.ch
  12. Subject: dealing with new-lines
  13. X-Mailer: Perl Mail System v1.1
  14.  
  15.  
  16. How should browsers deal with new-lines, and where can html-generators
  17. put in new-lines?
  18.  
  19. I spent quite a bit of time thinking about what is intuitively the right
  20. way to do it, and I came up with this method.
  21.  
  22. 0. Convert all new-lines inside of tags to spaces.
  23.  
  24. 1. For each tag NOT in
  25.      <PRE> </PRE> <A> </A> <PLAINTEXT>
  26.    remove ALL surrounding new-lines.
  27.  
  28. 2. For each tag in
  29.      <PRE> <PLAINTEXT>
  30.    remove ALL new-lines to left, and one new-line to the right.
  31.  
  32. 3. For each tag in
  33.      </PRE>
  34.    remove ALL new-lines to the right.
  35.  
  36. 4. Convert all remaining new-lines to spaces.
  37.  
  38. If XMP and LISTING sections are being used, they would be treated the
  39. same as PRE.
  40.  
  41. Note that this converts new-lines around anchors into spaces UNLESS they
  42. appear immediately at the beginning or end of some other element.
  43.  
  44. If browsers use this method, it would allow html-generators to put in
  45. new-lines all over the place for readability of HTML, without introducing
  46. lots of annoying extra spaces in the output.  This is what seems like
  47. the most useful thing to do, although I'm not sure it is "correct".
  48.  
  49. So is it correct?  And are there any obvious flaws?
  50.  
  51.        tom